if ($msg =~ /^login (.*)/) {
  my ($asku, $askp) = split(/ /, $1);
  
  if (exists $users->{$asku}) {
    if ($users->{$asku}->{password} eq md5($askp)) {
      $session->{$email} = $asku;
      $self->sendMessage("You are now logged in.");
    }
    else {
      $self->sendMessage("Sorry, wrong password!");
    }
  }
  else {
    $self->sendMessage("Sorry, that user does not exist.");
  }
}